import random
x = int(input())
n = int(input())
random.seed(x)
count = 0
for i in range(n):
    list = []
    for item in range(23):
        num = random.randint(1,365)
        list.append(num)
    if len(set(list)) != len(list):
        count += 1
print("rate={:.2f}".format(count/n))
